//
//  MovieCell.m
//  UI_豆瓣app
//
//  Created by 151129-49宋强 on 15/12/24.
//  Copyright © 2015年 www.lanou3g.com蓝鸥. All rights reserved.
//

#import "MovieCell.h"

//延展
@interface MovieCell()

@property (nonatomic, strong) UIImageView  *bottomView;

@end

@implementation MovieCell
#pragma mark - 初始化

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //view
        self.bottomView = [[UIImageView alloc] init];
       // _bottomView.backgroundColor = [UIColor cyanColor];
        _bottomView.image = [UIImage imageNamed:@"bg_eventlistcell"];
        _bottomView.layer.cornerRadius = 10;
    
        [self.contentView addSubview:_bottomView];
        //image
        self.movieImg = [[UIImageView alloc] init];
       // _movieImg.backgroundColor = [UIColor redColor];
        [_bottomView addSubview:_movieImg];
        //title
        self.moveTitle = [[UILabel alloc] init];
        //_moveTitle.backgroundColor = [UIColor yellowColor];
        [_bottomView addSubview:_moveTitle];
    }
    return self;
}
#pragma mark - 布局

- (void)layoutSubviews
{
    [super layoutSubviews];
    _bottomView.frame = CGRectMake(10, 10, self.contentView.frame.size.width - 20, self.contentView.frame.size.height - 20);
    _movieImg.frame = CGRectMake(10, 10, 100, _bottomView.frame.size.height - 20);
    _moveTitle.frame = CGRectMake(10 + 100 +10, 0, _bottomView.frame.size.width - 30 - 100, 40);
    _moveTitle.center = CGPointMake(_moveTitle.center.x, _movieImg.center.y);
    
    
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
